Problem with patchfiles (same name for different versions)
MacPorts stores patchfiles in /opt/local/var/macports/distfiles/${name} e.g. /opt/local/var/macports/distfiles/mpfr contains here: -rw-r--r-- 1 root admin 787634 2007-07-24 16:10:58 mpfr-2.2.1.tar.bz2 -rw-r--r-- 1 root admin 872947 2007-08-29 15:38:57 mpfr-2.3.0.tar.bz2 -rw-r--r-- 1 root admin 1826 2007-07-24 16:10:49 patch01 -rw-r--r-- 1 root admin 1687 2007-07-24 16:10:52 patch02 -rw-r--r-- 1 root admin 11655 2007-07-24 16:10:52 patch03 -rw-r--r-- 1 root admin 7509 2007-07-24 16:10:53 patch04 -rw-r--r-- 1 root admin 16992 2007-07-24 16:10:53 patch05 The problem is that patches are not stored in a subdirectory that depends on the version. So, there is a clash if I want to declare patch01 as a new patchfile for mpfr-2.3.0. What is the recommended solution? -- Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/> 100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/> Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)
Vincent Lefevre wrote:
The problem is that patches are not stored in a subdirectory that depends on the version. So, there is a clash if I want to declare patch01 as a new patchfile for mpfr-2.3.0. What is the recommended solution?
Usually the patch files are overwritten along with the Portfile. So you have one set of Portfile + files for each version/release. And when you add the new distfile for the new version of the port, the old distfile is removed at the same time (usually same commit) If one wants to dig up old versions/releases, then SVN is used... (it can be archived into a portpkg or source package if so desired) --anders
Le 3 sept. 07 à 15:29, Anders F Björklund a écrit :
Vincent Lefevre wrote:
The problem is that patches are not stored in a subdirectory that depends on the version. So, there is a clash if I want to declare patch01 as a new patchfile for mpfr-2.3.0. What is the recommended solution?
Usually the patch files are overwritten along with the Portfile. So you have one set of Portfile + files for each version/release. And when you add the new distfile for the new version of the port, the old distfile is removed at the same time (usually same commit)
If one wants to dig up old versions/releases, then SVN is used... (it can be archived into a portpkg or source package if so desired)
--anders
I think he's talking about patches fetched from remote sources. -- Anthony Ramine, the infamous MacPorts Trac slave. nox@macports.org
N_Ox wrote:
The problem is that patches are not stored in a subdirectory that depends on the version. So, there is a clash if I want to declare patch01 as a new patchfile for mpfr-2.3.0. What is the recommended solution?
Usually the patch files are overwritten along with the Portfile. So you have one set of Portfile + files for each version/release. And when you add the new distfile for the new version of the port, the old distfile is removed at the same time (usually same commit)
I think he's talking about patches fetched from remote sources.
Okay, then it will fall into the "what to do when upstream does not have versioned files" category. As in: they probably need renaming. e.g. patch01 -> mpfr-2.3.0-patch01 --anders
On 2007-09-03 16:20:04 +0200, Anders F Björklund wrote:
N_Ox wrote:
Usually the patch files are overwritten along with the Portfile. So you have one set of Portfile + files for each version/release. And when you add the new distfile for the new version of the port, the old distfile is removed at the same time (usually same commit)
I think he's talking about patches fetched from remote sources.
Yes. Of course, I could put the patches in the MacPorts repository, but I don't think this is recommended, as not every MacPorts user need them (if every ports did that, it would multiply the repository and working copy size by some factor).
Okay, then it will fall into the "what to do when upstream does not have versioned files" category. As in: they probably need renaming.
Upstream patches are versioned: they are in different subdirectories. But MacPorts doesn't care, unless I've missed something to have the subdirectory taken into account.
e.g. patch01 -> mpfr-2.3.0-patch01
How can I do that? "patchfiles" contains only the patch names, I didn't see any possibility of rename. -- Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/> 100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/> Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)
On 2007-09-03 16:39:35 +0200, Vincent Lefevre wrote:
Upstream patches are versioned: they are in different subdirectories. But MacPorts doesn't care, unless I've missed something to have the subdirectory taken into account.
Also, I tried specifying the directory after patchfiles, but "port" does a bus error in this case: Portfile changed since last build; discarding previous state. ---> Fetching mpfr ---> mpfr-2.3.0/patch01 doesn't seem to exist in /opt/local/var/macports/distfiles/mpfr ---> Attempting to fetch mpfr-2.3.0/patch01 from http://www.mpfr.org/ zsh: bus error sudo port -v upgrade mpfr -- Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/> 100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/> Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)
On Sep 3, 2007, at 09:48, Vincent Lefevre wrote:
On 2007-09-03 16:39:35 +0200, Vincent Lefevre wrote:
Upstream patches are versioned: they are in different subdirectories. But MacPorts doesn't care, unless I've missed something to have the subdirectory taken into account.
Also, I tried specifying the directory after patchfiles, but "port" does a bus error in this case:
Portfile changed since last build; discarding previous state. ---> Fetching mpfr ---> mpfr-2.3.0/patch01 doesn't seem to exist in /opt/local/var/ macports/distfiles/mpfr ---> Attempting to fetch mpfr-2.3.0/patch01 from http://www.mpfr.org/ zsh: bus error sudo port -v upgrade mpfr
I also don't know if patchfiles/distfiles can be renamed after download. In the absence of that feature, I recommend: dist_subdir ${name}/${version} (Instead of the default dist_subdir ${name})
On 2007-09-03 12:18:29 -0500, Ryan Schmidt wrote:
I also don't know if patchfiles/distfiles can be renamed after download. In the absence of that feature, I recommend:
dist_subdir ${name}/${version}
(Instead of the default dist_subdir ${name})
Thanks, this solves the problem. -- Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/> 100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/> Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)
On Sep 3, 2007, at 10:39 AM, Vincent Lefevre wrote:
Upstream patches are versioned: they are in different subdirectories. But MacPorts doesn't care, unless I've missed something to have the subdirectory taken into account.
You could always rename ${distpath}, which is were files are downloaded to (${prefix}/var/macports/distfiles/${name} by default IIRC) and do something like "set distpath ${prefix}/var/macports/ distfiles/${name}-${version}" or whatever. That would certainly download everything into a versioned subdir of the distfiles directory, but I don't know all the implications that might have for other things like cleaning (I presume none, but exercising caution is always good). Regards,... -jmpp
On Sep 5, 2007, at 14:21, Juan Manuel Palacios wrote:
On Sep 3, 2007, at 10:39 AM, Vincent Lefevre wrote:
Upstream patches are versioned: they are in different subdirectories. But MacPorts doesn't care, unless I've missed something to have the subdirectory taken into account.
You could always rename ${distpath}, which is were files are downloaded to (${prefix}/var/macports/distfiles/${name} by default IIRC) and do something like "set distpath ${prefix}/var/macports/ distfiles/${name}-${version}" or whatever. That would certainly download everything into a versioned subdir of the distfiles directory, but I don't know all the implications that might have for other things like cleaning (I presume none, but exercising caution is always good).
I already suggested using "dist_subdir ${name}/${version}" which is a bit simpler, and Vincent already did this: http://trac.macosforge.org/projects/macports/changeset/28573 The fact that MacPorts offers a "dist_subdir" keyword implies to me that it will work properly for all cases. If it does not, I would consider that a bug.
participants (5)
-
Anders F Björklund
-
Juan Manuel Palacios
-
N_Ox
-
Ryan Schmidt
-
Vincent Lefevre