Re: [PATCH osinfo-db] Add support for DESTDIR

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Sep 13, 2016 at 11:59:27AM +0200, Zeeshan Ali (Khattak) wrote:
> Hmm.. this would work but it creates an extra directory level,
> osinfo-db at DESTDIR (when invoked with --system target):
> 
> /jhbuild/_jhbuild/root-osinfo-db/osinfo-db

Are your sure that's not related to configure args you used
when building osinfo-db-tools.

The osinfo-db-import command will merely concatenate the
default --system path with the --root path. So

eg if I see the default system path:

$ osinfo-db-path --system
/usr/share/osinfo

And use a --root of /tmp/jhbuild:

$ osinfo-db-import  --root /tmp/jhbuild --system osinfo-db-20160913.tar.xz 

It'll end up installing in

$ ls /tmp/jhbuild/usr/share/osinfo/
datamap  device  install-script  os  platform  schema  VERSION


So whatever path you are getting is a result of of
args you passed for DESTDIR and/or previous
configure args used for osinfo-db-tools build

> On Tue, Sep 13, 2016 at 11:03 AM, Daniel P. Berrange
> <berrange@xxxxxxxxxx> wrote:
> > The jhbuild system doesn't support plain "make" systems,
> > so we need to pretend to be more automake-like. Adding
> > DESTDIR support lets jhbuild' automake "make install"
> > step work.
> >
> > Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx>
> > ---
> >  Makefile     | 3 ++-
> >  autobuild.sh | 2 +-
> >  2 files changed, 3 insertions(+), 2 deletions(-)
> >
> > diff --git a/Makefile b/Makefile
> > index 3cffade..53a2ea5 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -6,6 +6,7 @@ TODAY = $(shell date +"%Y%m%d")
> >  OSINFO_DB_EXPORT = osinfo-db-export
> >  OSINFO_DB_IMPORT = osinfo-db-import
> >
> > +DESTDIR = /
> >  OSINFO_DB_TARGET = --user
> >
> >  INTLTOOL_MERGE = intltool-merge
> > @@ -48,7 +49,7 @@ INTLTOOL_MERGE_OPTS_1 =
> >  all: $(ARCHIVE) osinfo-db.spec mingw-osinfo-db.spec
> >
> >  install: $(ARCHIVE)
> > -       $(OSINFO_DB_IMPORT) $(OSINFO_DB_TARGET) $(ARCHIVE)
> > +       $(OSINFO_DB_IMPORT) --root $(DESTDIR) $(OSINFO_DB_TARGET) $(ARCHIVE)
> >
> >  %.spec: %.spec.in Makefile
> >         $(V_GEN) $(SED) -e "s/@VERSION@/$(TODAY)/" < $< > $@
> > diff --git a/autobuild.sh b/autobuild.sh
> > index d3b8cf4..d82b0ef 100755
> > --- a/autobuild.sh
> > +++ b/autobuild.sh
> > @@ -22,7 +22,7 @@ case $MAKEFLAGS in
> >  esac
> >
> >  make
> > -make install OSINFO_DB_TARGET="--system --root $AUTOBUILD_INSTALL_ROOT"
> > +make install DESTDIR="$AUTOBUILD_INSTALL_ROOT" OSINFO_DB_TARGET="--system"
> >
> >  if [ -n "$AUTOBUILD_COUNTER" ]; then
> >    EXTRA_RELEASE=".auto$AUTOBUILD_COUNTER"
> > --

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

_______________________________________________
Libosinfo mailing list
Libosinfo@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libosinfo



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux