FS#9190 - gensync in new pacman 3.1 expects wrong names for packages

Attached to Project: Pacman
Opened by (N/A) (wantilles) - Sunday, 13 January 2008, 12:02 GMT
Last edited by Dan McGee (toofishes) - Sunday, 13 January 2008, 18:36 GMT
Task Type Bug Report
Category General
Status Closed
Assigned To Dan McGee (toofishes)
Architecture All
Severity Medium
Priority Normal
Reported Version 3.1.0
Due in Version 3.1.1
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Summary and Info:

gensync in new pacman 3.1 expects wrong names for packages

Steps to Reproduce:

Do a gensync in any directory with packages.

For the same package you get:

- with old gensync (pacman 3.0):

:: adding package '../comix-3.6.4-1-i686.pkg.tar.gz'

- with new gensync (pacman 3.1)

==> ERROR: could not find comix-3.6.4-1-i686..pkg.tar.gz - skipping

Notice the TWO DOTS (instead of one) after the ARCH flag in the package name that the new gensync expects.

Of course this is wrong.
This task depends upon

Closed by  Dan McGee (toofishes)
Sunday, 13 January 2008, 18:36 GMT
Reason for closing:  Fixed
Additional comments about closing:  http://bugs.archlinux.org/task/9194#comm ent23453
Comment by (N/A) (wantilles) - Sunday, 13 January 2008, 12:28 GMT
And here is the solution:

In makepkg.conf

Change:

[code]PKGEXT='.pkg.tar.gz'
SRCEXT='.src.tar.gz'[/code]

To:

[code]PKGEXT='pkg.tar.gz'
SRCEXT='src.tar.gz'[/code]

Remove the first dot.

Because there is a second dot added in gensync here:

[code] if [ "$pkgdir" != "" ]; then
pkgfile="$pkgdir/$pkgname-$pkgver-$pkgrel-$CARCH.$PKGEXT"
else
pkgfile="$destdir/$pkgname-$pkgver-$pkgrel-$CARCH.$PKGEXT"
fi[/code]
Comment by (N/A) (wantilles) - Sunday, 13 January 2008, 12:30 GMT
Just tested the fix in makepkg.conf and it works.
Comment by Travis Willard (Cerebral) - Sunday, 13 January 2008, 12:40 GMT
Patch against pacman source attached.

I've also emailed this to the pacman-dev ML
Comment by Travis Willard (Cerebral) - Sunday, 13 January 2008, 12:41 GMT
> Just tested the fix in makepkg.conf and it works.

That is not the fix. Now that you've removed the leading period, every other script that sources makepkg.conf is broken - just try running makepkg, for instance.

The real fix (against the pacman source) is in my attached patch above - basically remove the extra dot from gensync, NOT from makepkg.conf.
Comment by Travis Willard (Cerebral) - Sunday, 13 January 2008, 12:46 GMT
Every problem is critical to the guy who finds it. :/

Dan - patch attached. Go nuts.
Comment by Travis Willard (Cerebral) - Sunday, 13 January 2008, 12:47 GMT
BTW, check out 'repo-add' and 'repo-remove' - I believe these are the scripts you want now, and gensync is deprecated.
Comment by Dan McGee (toofishes) - Sunday, 13 January 2008, 17:29 GMT
Changing makepkg.conf is going to put you in a world of hurt. I would not recommend that, becuase every other script except gensync/updatesync is going to break.

We'll get this in 3.1.1.

Loading...