[pacman-dev] [PATCH] repo-add: fix db creation one last time

Dan McGee dpmcgee at gmail.com
Wed Jun 29 23:15:12 EDT 2011

On Wed, Jun 29, 2011 at 10:06 PM, Dave Reisner <d at falconindy.com> wrote:
> On Thu, Jun 30, 2011 at 01:01:35PM +1000, Allan McRae wrote:
>> On 29/06/11 10:58, Dan McGee wrote:
>> >We fubar-ed this pretty good.
>> >
>> >1. The whole old/new move shuffle was totally busted if you used a
>> >relative path to your database, as we would just build the database in
>> >place.
>> >2. Our prior temp directory layout had the database files extracted
>> >directly into it. When we tried to create a xxx.db.tar.gz file in this
>> >same directory, due to the fact that we were no longer using a shell
>> >wildcard, we tried to include the db in ourself, which is a big failure.
>> >Fix all this by extracting to tree/ so we can have a clean top-level
>> >temp directory.
>> >3. Fix the inclusion of the './' directory entry; ensure the regex
>> >prunes both leading paths of '.' as well as './'.
>> >
>> >Where is that test suite again?
>> >
>> >Signed-off-by: Dan McGee<dan at archlinux.org>
>> Signed-off-by: Allan
>> Updating my repo without this patch resulted in fun!
> I think we axed this as well. The tarball gets all out of order
> (directories first), so we're going to go with my original patch that
> Dan Nack'ed, which was to use "ugly" bash...
> (shopt -s nullgob; files=(*); ((${#files[*]})))
> almost lispy...

No, we axed just the bsdtar bit, not the rest of it. Creating a tar
file in the same directory as the files you are archiving is not
really a good idea ever, even if some crappy shell expansion avoids
it. It clearly burned us once, so I'm not having it burn us again.


More information about the pacman-dev mailing list