Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: xmw@g.o
Subject: Re: [gentoo-dev] RFC: vcs-snapshot-r1.eclass -- a better eclass for VCS snapshots (and others)
Date: Tue, 12 Jun 2012 14:46:35
Message-Id: 20120612164655.0ccee481@pomiocik.lan
In Reply to: Re: [gentoo-dev] RFC: vcs-snapshot-r1.eclass -- a better eclass for VCS snapshots (and others) by Michael Weber
On Tue, 12 Jun 2012 15:26:58 +0200
Michael Weber <xmw@g.o> wrote:

> -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA256 > > - From the eclass: > > # XXX: check whether the directory structure inside is > # fine? i.e. if the tarball has actually a parent dir. > > This should work with gnu and bsd tar, and sed+sort+wc from > sys-apps/coreutils as well as busybox. > > [ $(bsdtar -t -f ~/keithw-mosh-mosh-1.2.1-0-g778b5af.zip \ > | sed 's:/.*::' | sort -u | wc -l) == 1 ] > > I'm totally sure if we have to handle leading slashes and ./ in > obscure tars/zips but I'd say this tests qualifies for an > || ewarn "Please check $f for an single parent directory" > or something like that.
Well, I was hoping to come up with something which doesn't involve running additional 'tar -t', to be honest. I have to think about it some more time. -- Best regards, Michał Górny

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies