Re: How to detect filename conflicts with uninstalled ports?

2010-11-21 Thread Anders F Björklund
Charlie Kester wrote:

 But I expect these two find  greps will detect the majority of filename
 conflicts.  Unless someone has a better recommendation, I'll settle for
 less than perfect.

Using a MANIFEST file for packages works, if you have one available.
It's simply a file listing of the contents of each and every package.
Then just grep that ?

--anders

___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Finding files in packages (MANIFEST)

2010-11-21 Thread Anders F Björklund

For PackageKit's app-install, I wanted to list all
ports/packages that had a .desktop file (= an app).

This ended up in a large number of false positives,
since there is no list of the contents of each package.
So the brute-force method is to download *all* of them.

For Slackware, which also uses tarballs for packages,
it was easier because they also make a MANIFEST file
available in addition to the FILE_LIST (= ls -lR)...

ftp://ftp.sunet.se/pub/Linux/distributions/slackware/slackware64-13.1/slackware64/FILE_LIST
ftp://ftp.sunet.se/pub/Linux/distributions/slackware/slackware64-13.1/slackware64/MANIFEST.bz2
ftp://ftp.sunet.se/pub/Linux/distributions/slackware/slackware64-13.1/slackware64/PACKAGES.TXT

Would it be possible to make such a file available
for FreeBSD Packages too ? (maybe even both of them)

--anders


PS. Here was the simple script I used to create mine:

#!/bin/sh

MF=/tmp/MANIFEST

for tbz in All/*.tbz
do
  echo $tbz
  echo ++  ${MF}
  echo ||  ${MF}
  echo ||   Package: $tbz  ${MF}
  echo ||  ${MF}
  echo ++  ${MF}
  tar tjvf $tbz  ${MF}
done

___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Re: Finding files in packages (MANIFEST)

2010-11-21 Thread Anders F Björklund
Chris Rees wrote:

 For PackageKit's app-install, I wanted to list all
 ports/packages that had a .desktop file (= an app).

 I may be misunderstanding you here, but you could just:
 
 [ch...@amnesiac]~% echo /usr/ports/*/*/pkg-plist | xargs egrep
 '\.desktop$' | sed 's|/usr/ports/[a-zA-Z]*/||'  contains_desktop

That could work too (?), I guess I was also trying to determine
which of the ports had a package available (for portinstall -P).

PackageKit wants the index pre-generated in SQLite form anyway:
https://github.com/hughsie/app-install
i.e. it wants a SQL table with all the desktop files and their
translations and a tarball with all their corresponding icons...

So after screening the list of packages, it would still have to
download each of them to extract the .desktop and (48x48) .png
so I wanted the list of ports to match the packages available.
Mostly since I didn't want to have to build every port first.


Just thought the MANIFEST could be generated with the packages ?
That way you wouldn't need to install the ports collection first.

Even better would be if the app-install data would be created too,
but that might be a taller order and could just go in a port/package.

--anders

___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


portlocate updated

2010-11-19 Thread Anders F Björklund
Hi freebsd ports,

I updated my ruby program called portlocate
to use Ferret rather than Xapian like before:

http://www.algonet.se/~afb/freebsd/portlocate.rb

The program works the same as before, but doesn't
need Xapian which was reoccuringly broken (and GPL).
The main part of Ferret is in C but there is a pure
Ruby version too, if needed (it's a port of Lucene):

http://www.freebsd.org/cgi/cvsweb.cgi/ports/textproc/rubygem-ferret/

I was originally hoping for it to get included in
pkgtools, but since those aren't maintained anymore
it should probably be made into a Ruby module too ?
So that it can be included from PackageKit, that is.

http://lists.freebsd.org/pipermail/freebsd-ruby/2009-September/000107.html

One nice thing about Ferret, besides the MIT license,
is that the database is smaller. It's a little slower.

--anders

___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


portlocate updated

2010-11-19 Thread Anders F Björklund
Hi freebsd ports,

I updated my ruby program called portlocate
to use Ferret rather than Xapian like before:

http://www.algonet.se/~afb/freebsd/portlocate.rb

The program works the same as before, but doesn't
need Xapian which was reoccuringly broken (and GPL).
The main part of Ferret is in C but there is a pure
Ruby version too, if needed (it's a port of Lucene):

http://www.freebsd.org/cgi/cvsweb.cgi/ports/textproc/rubygem-ferret/

I was originally hoping for it to get included in
pkgtools, but since those aren't maintained anymore
it should probably be made into a Ruby module too ?
So that it can be included from PackageKit, that is.

http://lists.freebsd.org/pipermail/freebsd-ruby/2009-September/000107.html

One nice thing about Ferret, besides the MIT license,
is that the database is smaller. It's a little slower.

--anders

___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


PackageKit Ports

2009-10-05 Thread Anders F Björklund


I've backported the PackageKit 0.5.x backend to 0.4.x,
and made some ports for it and the GNOME/KDE frontends.

As described earlier, it uses portupgrade and portaudit
and compiles binary packages from source ports if needed.

http://afb.users.sourceforge.net/packagekit/

Hopefully this will go into PackageKit 0.4.10, for use
while waiting for required PolicyKit/DeviceKit support.

Besides some (unused) differences in API, the backend is
identical to the one in the latest PackageKit (0.5.2).

Feedback appreciated, maintainer didn't respond.

--anders

___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Re: PackageKit Ports

2009-10-05 Thread Anders F Björklund

Joe Marcus Clarke wrote:


Hopefully this will go into PackageKit 0.4.10, for use
while waiting for required PolicyKit/DeviceKit support.

Besides some (unused) differences in API, the backend is
identical to the one in the latest PackageKit (0.5.2).

Feedback appreciated, maintainer didn't respond.


Which maintainer?  I'm quite excited about this work.


Maybe I did something wrong, I tried to contact maintainer
of portupgrade since I had some port search additions...

Didn't post the ports earlier (before this backend backport),
since it was kinda useless to run with the dummy backend. :-)


We have the
latest PolicyKit coming with GNOME 2.28 (once 8.0 is out the door).
DeviceKit will probably never happen on FreeBSD.  DK-power will be
coming with GNOME 2.30, however.  What kind of DK support does
PackageKit require?


Currently PackageKit requires both PolicyKitOne (0.9x) and also
Glib 2.22+, which was why it needed to wait for GNOME 2.28 etc.

gnome-packagekit requires DeviceKit-power for battery support,
but I added a disabler meanwhile (i.e. assume power is connected).

--anders

___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Re: PackageKit Ports

2009-10-05 Thread Anders F Björklund

Joe Marcus Clarke wrote:


Didn't post the ports earlier (before this backend backport),
since it was kinda useless to run with the dummy backend. :-)


No problem.  I did notice some nits in the plist of packagekit.  You
should not include blank lines (even to logically segment  
sections).  If

you want true separation, use separate plists.  Once I have some time,
I'll go through them in more detail.  I'd love to get them committed.


Will make some real PR requests for the ports for you to review, then.
(thought I had run them all through portlint, but I'm new at it all)
Hopefully that megapatch + autogen won't be needed after 0.4.10 either.


Currently PackageKit requires both PolicyKitOne (0.9x) and also
Glib 2.22+, which was why it needed to wait for GNOME 2.28 etc.


If you want to test the latest version with GNOME 2.28, see
http://www.freebsd.org/gnome/docs/develfaq.html .  We have GNOME 2.28
with polkit-0.9.4 in the tree.


I do have some PackageKit-devel etc. ports, but couldn't keep up
with the development during GNOME 2.27... Now that GNOME 2.28
(and GPackageKit 2.28 and GLib 2.22) has been released, I might.


gnome-packagekit requires DeviceKit-power for battery support,
but I added a disabler meanwhile (i.e. assume power is connected).


Cool.  That support will be coming.  They have finally merged a branch
of DK-power which offers modular backend support.  My project for  
GNOME

2.30 is DK-power.



For my desktop, battery support wasn't really mandatory anyway...
(Moblin developers had another opinion, so it's required in 2.28.0)
But I'm also normally using either KDE or Xfce, rather than GNOME.

--anders

___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Ports backend for PackageKit

2009-09-16 Thread Anders F Björklund

Hi all,

I have made a ports backend for PackageKit (http://packagekit.org/)
that uses ports-mgmt/portupgrade and optionally ports-mgmt/portaudit.

It's a spawned backend, which means that the dbus deamon will start
a Ruby script that then dispatches command for as long as it runs...


It's currently included in the next generation PackageKit (0.5.x),
which requires Glib version 2.21.5+ and PolicyKit version 0.92+
that aren't available in the ports tree. It should be possible to
backport the backend to the previous PackageKit (0.4.x) meanwhile.

PackageKit has one frontend for GNOME (gnome-packagekit) and one
frontend for (KPackageKit), both of them are running OK on FreeBSD:
http://www.algonet.se/~afb/freebsd/packagekit/packagekit-freebsd.png
http://www.algonet.se/~afb/freebsd/packagekit/kpackagekit-freebsd.png


The backend is a source backend, which means that if there isn't
a binary package available it will install the source port instead.
It will check for packages first though, and it also build packages.
(i.e. it uses portupgrade -Pp). All default OPTIONS are selected.

It's not intended for advanced users, so those will still need to
use portupgrade directly or a graphic interface to it (like BPM).
Currently the information for codecs/fonts/mimetypes/firmware/etc
isn't available in the ports/packages, so those features are missing.


For more information see http://www.packagekit.org/ and for code
see http://cgit.freedesktop.org/packagekit/tree/backends/ports/

Will try to get the ports for the old version added after backport:
PackageKit (only dummy now), gnome-packagekit, kpackagekit


Feedback appreciated.
--anders

___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org