Posts Tagged ‘Project’
Ubuntu PPA for Firefox 4.0b2 – Tested & Working :-)
The latest firefox without the update hassle.
One daily a month from ubuntu-mozilla-daily.
- One update a month.
- Firefox and xulrunner only.
- Tested in a virtual machine.
Firefox has its own PPA so nothing else gets updated.
You don’t get swamped with updates.
You do get the latest Firefox each month.
______________________________
Firefox-4.0 – One Daily A Month #1 – Lucid
sudo add-apt-repository ppa:silverwave/one-daily-a-month-1 sudo apt-get update sudo apt-get install firefox-4.0
Firefox-4.0 – One Daily A Month #3 – Karmic
sudo add-apt-repository ppa:silverwave/one-daily-a-month-3 sudo apt-get update sudo apt-get install firefox-4.0
______________________________
All tested and working
Based on:
4.0~b2~hg20100712r47317+nobinonly-0ubuntu1~umd2
2.0~b2~hg20100712r47317+nobinonly-0ubuntu1~umd1
Enjoy!
Details here:
http://ubuntuforums.org/showthread.php?t=1352580
Notify-osd – Now with 70% Less Annoy :-)
Reduce the notify-osd time-out to 3 seconds, rather than the default 10.
Its amazing how much this changed my appreciation of the notifications…
I have found the annoyance is mainly based on them being on screen too long.
Tested on Lucid 10.04 64bit – experimental.
Quick Fix: Add the PPA and update:
sudo add-apt-repository ppa:silverwave/apps-0 sudo apt-get update sudo apt-get install notify-osd
______________________________
If you:
Want to create your own package…
Would like to see a worked example…
Want to see how to alter an existing package…
Or would like an explanation of how to Publish a package to your PPA.
…carry on reading.
______________________________
Packaging
Install Packaging Tools
sudo apt-get install devscripts build-essential fakeroot debhelper gnupg pbuilder dh-make ubuntu-dev-tools diff patch cdbs quilt lintian
Create a folder to work in
sil:~$ mkdir pak sil:~$ cd pak sil:~/pak$ ls sil:~/pak$
Test the display time of notify-osd
sudo apt-get install libnotify-bin notify-send "test" "Write some notify-osd text on screen... for How Long?!"
Download the source for notify-osd
sil@hyd:~/pak$ apt-get source notify-osd
Reading package lists... Done Building dependency tree Reading state information... Done NOTICE: 'notify-osd' packaging is maintained in the 'Bzr' version control system at: http://bazaar.launchpad.net/~ubuntu-desktop/notify-osd/ubuntu Please use: bzr get http://bazaar.launchpad.net/~ubuntu-desktop/notify-osd/ubuntu to retrieve the latest (possibly unreleased) updates to the package. Need to get 623kB of source archives. Get: 1 http://gb.archive.ubuntu.com/ubuntu/ lucid/main notify-osd 0.9.29-0ubuntu2 (dsc) [1,305B] Get: 2 http://gb.archive.ubuntu.com/ubuntu/ lucid/main notify-osd 0.9.29-0ubuntu2 (tar) [608kB] Get: 3 http://gb.archive.ubuntu.com/ubuntu/ lucid/main notify-osd 0.9.29-0ubuntu2 (diff) [14.4kB] Fetched 623kB in 2s (227kB/s) gpgv: Signature made Wed 14 Apr 2010 11:59:03 BST using DSA key ID A2D7D292 gpgv: Can't check signature: public key not found dpkg-source: warning: failed to verify signature on ./notify-osd_0.9.29-0ubuntu2.dsc dpkg-source: info: extracting notify-osd in notify-osd-0.9.29 dpkg-source: info: unpacking notify-osd_0.9.29.orig.tar.gz dpkg-source: info: applying notify-osd_0.9.29-0ubuntu2.diff.gz dpkg-source: info: upstream files that have been modified: notify-osd-0.9.29/autogen.sh notify-osd-0.9.29/data/org.freedesktop.Notifications.service.in notify-osd-0.9.29/m4/python.m4 notify-osd-0.9.29/src/bubble.c notify-osd-0.9.29/src/send-test-notification.sh notify-osd-0.9.29/tests/notifyosd.py notify-osd-0.9.29/tests/tests.suppression sil@hyd:~/pak$
List the files and folders
sil@hyd:~/pak$ ls notify-osd-0.9.29 notify-osd_0.9.29.orig.tar.gz notify-osd_0.9.29-0ubuntu2.diff.gz notify-osd_0.9.29-0ubuntu2.dsc
Setup .bashrc example
sil@hyd:~$ gedit .bashrc
Add these lines:
export DEBFULLNAME="silverwave (Launchpad OpenPGP Key)" export DEBEMAIL="silverwav@gmail.com"
Setup .pbuilderrc example
sil@hyd:~$ gedit .pbuilderrc
Add these lines:
COMPONENTS="main restricted universe multiverse"
______________________________
Update Package
Change notify-osd time-out value
sil@hyd:~/pak$ cd notify-osd-0.9.29 sil@hyd:~/pak/notify-osd-0.9.29$ gedit src/defaults.c
Find:
#define DEFAULT_ON_SCREEN_TIMEOUT 10000
Change to:
#define DEFAULT_ON_SCREEN_TIMEOUT 3000
Save and close gedit.
Update the debian changelog with debchange (dch -i)
sil@hyd:~/pak/notify-osd-0.9.29$ dch -i
Update Version Number:
0.9.29-0ubuntu2ppa1
Add Change Details:
* src/defaults.c:
- Changed DEFAULT_ON_SCREEN_TIMEOUT from 10000 to 3000
Note: Your email needs to be perfect…
This is correct for me:
-- silverwave (Launchpad OpenPGP Key) <silverwav@gmail.com> Sat, 08 May 2010 18:50:00 +0100
This would cause gpg to fail later when attempting to sign the files.
-- silverwave <silverwav@gmail.com> Sat, 08 May 2010 18:50:00 +0100
Save and close nano (ctrl+x).
Update the source package (debuild -S -sa)
sil@hyd:~/pak/notify-osd-0.9.29$ debuild -S -sa
You will be asked for your gpg passphrase twice.
Then you should see a success message.
Successfully signed dsc and change files
Updated Files
sil@hyd:~/pak/notify-osd-0.9.29$ cd .. sil@hyd:~/pak$ sil@hyd:~/pak$ ls notify-osd-0.9.29 notify-osd_0.9.29-0ubuntu2.diff.gz notify-osd_0.9.29-0ubuntu2.dsc notify-osd_0.9.29-0ubuntu2ppa1.diff.gz notify-osd_0.9.29-0ubuntu2ppa1.dsc notify-osd_0.9.29-0ubuntu2ppa1_source.build notify-osd_0.9.29-0ubuntu2ppa1_source.changes notify-osd_0.9.29.orig.tar.gz
Pbuilder initial environment setup
sil@hyd:~/pak$ sudo pbuilder create
Build package with pbuilder
sil@hyd:~/pak$ sudo pbuilder build notify-osd_0.9.29-0ubuntu2ppa1.dsc
Once pbuilder has completed the build you can see the .deb here:
/var/cache/pbuilder/result
______________________________
Uploading a package to a PPA
sil@hyd:~/pak$ dput ppa:silverwave/apps-0 notify-osd_0.9.29-0ubuntu2ppa1_source.changes
Checking signature on .changes gpg: Signature made Sat 08 May 2010 18:54:45 BST using RSA key ID 03187548 gpg: Good signature from "silverwave (Launchpad OpenPGP Key) <silverwav@gmail.com>" Good signature on /home/sil/pak/notify-osd_0.9.29-0ubuntu2ppa1_source.changes. Checking signature on .dsc gpg: Signature made Sat 08 May 2010 18:53:20 BST using RSA key ID 03187548 gpg: Good signature from "silverwave (Launchpad OpenPGP Key) <silverwav@gmail.com>" Good signature on /home/sil/pak/notify-osd_0.9.29-0ubuntu2ppa1.dsc. Package includes an .orig.tar.gz file although the debian revision suggests that it might not be required. Multiple uploads of the .orig.tar.gz may be rejected by the upload queue management software. Uploading to ppa (via ftp to ppa.launchpad.net): Uploading notify-osd_0.9.29-0ubuntu2ppa1.dsc: done. Uploading notify-osd_0.9.29.orig.tar.gz: done. Uploading notify-osd_0.9.29-0ubuntu2ppa1.diff.gz: done. Uploading notify-osd_0.9.29-0ubuntu2ppa1_source.changes: done. Successfully uploaded packages. sil@hyd:~/pak$
Email confirmation
[PPA silverwave-apps-0] [ubuntu/lucid] notify-osd 0.9.29-0ubuntu2ppa1 (Accepted)
Launchpad PPA
to me
show details 11:30 PM (9 minutes ago)
Accepted:
OK: notify-osd_0.9.29.orig.tar.gz
OK: notify-osd_0.9.29-0ubuntu2ppa1.diff.gz
OK: notify-osd_0.9.29-0ubuntu2ppa1.dsc
-> Component: main Section: x11
Format: 1.8
Date: Sat, 08 May 2010 18:50:00 +0100
Source: notify-osd
Binary: notify-osd
Architecture: source
Version: 0.9.29-0ubuntu2ppa1
Distribution: lucid
Urgency: low
Maintainer: DX Team <dx-team@lists.ubuntu.com>
Changed-By: silverwave (Launchpad OpenPGP Key) <silverwav@gmail.com>
Description:
notify-osd - daemon that displays passive pop-up notifications
Changes:
notify-osd (0.9.29-0ubuntu2ppa1) lucid; urgency=low
* src/defaults.c:
- Changed DEFAULT_ON_SCREEN_TIMEOUT from 10000 to 3000
Checksums-Sha1:
e51a110171de8622c325ab56c598ba15322e3e9b 1613 notify-osd_0.9.29-0ubuntu2ppa1.dsc
795ecc42602b46390437c3787f3eb94f6fd562fc 607576 notify-osd_0.9.29.orig.tar.gz
650adb6b4695a50da86fe46f7c877ada1defe0a1 14612 notify-osd_0.9.29-0ubuntu2ppa1.diff.gz
Checksums-Sha256:
17e7c4c6e4d41a2d321ad6a23a2671f854c299b656bb22e6894edeeda65ee83c 1613 notify-osd_0.9.29-0ubuntu2ppa1.dsc
7b8d79fc6dce7002fb3639ae7e9ad85e5f5063fbcc62fe27b80700142a0d7fd7 607576 notify-osd_0.9.29.orig.tar.gz
02903f5080d5a58bf89f6220294e62a30e342a202f8e67fd7f80fa7c5e609f25 14612 notify-osd_0.9.29-0ubuntu2ppa1.diff.gz
Files:
79e54b412cf3029013b4cdbef8ae01ce 1613 x11 optional notify-osd_0.9.29-0ubuntu2ppa1.dsc
13df20eb3c6d06c17eef07400e1650d8 607576 x11 optional notify-osd_0.9.29.orig.tar.gz
9c8f64588ed44e0c93142bd4cf5c52f2 14612 x11 optional notify-osd_0.9.29-0ubuntu2ppa1.diff.gz
--
You are receiving this email because you are the uploader of the above
PPA package.
Check the PPA
https://launchpad.net/~silverwave/+archive/apps-0/+builds?build_state=built
1 → 2 of 2 results [FULLYBUILT] i386 build of notify-osd 0.9.29-0ubuntu2ppa1 in ubuntu lucid RELEASE Build started 18 minutes ago on samarium (virtual) and finished 13 minutes ago taking five minutes — see the log [FULLYBUILT] amd64 build of notify-osd 0.9.29-0ubuntu2ppa1 in ubuntu lucid RELEASE Build started 20 minutes ago on americium (virtual) and finished 15 minutes ago taking five minutes — see the log
https://launchpad.net/~silverwave/+archive/apps-0/+packages
Expanding the package you may see this message:
Note: Some binary packages for this source are not yet published in the repository.
You will need to wait until the binary packages are build before testing.
Add PPA
sil@hyd:~/pak$ sudo add-apt-repository ppa:silverwave/apps-0 [sudo] password for sil: Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring /etc/apt/secring.gpg --trustdb-name /etc/apt/trustdb.gpg --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver keyserver.ubuntu.com --recv 4E0614F88874AF754D66E9C1EBD6062C6DE6117C gpg: requesting key 6DE6117C from hkp server keyserver.ubuntu.com gpg: key 6DE6117C: "Launchpad PPA for SilverWav" not changed gpg: Total number processed: 1 gpg: unchanged: 1
Check policy
sil@hyd:~/pak$ sudo apt-get update
...
sil@hyd:~/pak$ apt-cache policy notify-osd
notify-osd:
Installed: 0.9.29-0ubuntu2
Candidate: 0.9.29-0ubuntu2ppa1
Version table:
0.9.29-0ubuntu2ppa1 0
500 http://ppa.launchpad.net/silverwave/apps-0/ubuntu/ lucid/main Packages
*** 0.9.29-0ubuntu2 0
500 http://gb.archive.ubuntu.com/ubuntu/ lucid/main Packages
100 /var/lib/dpkg/status
Install notify-osd – Now with 70% Less Annoy :-)
sil@hyd:~/pak$ sudo apt-get install notify-osd Reading package lists... Done Building dependency tree Reading state information... Done The following packages will be upgraded: notify-osd 1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Need to get 177kB of archives. After this operation, 0B of additional disk space will be used. Get: 1 http://ppa.launchpad.net/silverwave/apps-0/ubuntu/ lucid/main notify-osd 0.9.29-0ubuntu2ppa1 [177kB] Fetched 177kB in 0s (416kB/s) (Reading database ... 185774 files and directories currently installed.) Preparing to replace notify-osd 0.9.29-0ubuntu2 (using .../notify-osd_0.9.29-0ubuntu2ppa1_amd64.deb) ... Unpacking replacement notify-osd ... Setting up notify-osd (0.9.29-0ubuntu2ppa1) ...
Done!
Note: Here is a link to a video that’s a great help, Learning MOTU – Upgrading Packages
Copy Packages from ‘ubuntu-mozilla-daily’ to your PPA with Python
Now that the Lucid rush is over and all the builders have been reassigned to the PPA duties I can get on with finishing this little project :-)
Quick and Dirty code for Displaying packages in a PPA, Then Copy from PPA ‘A’ to PPA ‘B’.
Bear in mind that the posted code is just a place holder and will be getting updated.
lp-getPubSo-and-Copy_odam-test.py
#! /usr/bin/env python
#123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789
# 1 2 3 4 5 6 7 8
#silverwave OpenPGP key 03187548
#
print
print 'Connect to Service and Register Application.'
from launchpadlib.launchpad import Launchpad
lp_ = Launchpad.login_with('sapp2', 'edge')
print
print 'Check Configuration.'
this_distro = lp_.distributions["ubuntu"]
print 'Distribution: ' + this_distro.display_name
umd_achive = lp_.people['ubuntu-mozilla-daily'].archive
print 'Copy From Archive: '
print umd_achive.displayname
print
# function #0 - confirm
## {{{ http://code.activestate.com/recipes/541096/ (r1)
def confirm(prompt=None, resp=False):
"""prompts for yes or no response from the user.
Returns True for yes and False for no.
'resp' should be set to the default value
>>> confirm(prompt='Create Directory?', resp=True)
Create Directory? [y]|n:
True
>>> confirm(prompt='Create Directory?', resp=False)
Create Directory? [n]|y:
False
>>> confirm(prompt='Create Directory?', resp=False)
Create Directory? [n]|y: y
True
"""
if prompt is None:
prompt = 'Confirm'
if resp:
prompt = '%s [%s]|%s: ' % (prompt, 'y', 'n')
else:
prompt = '%s [%s]|%s: ' % (prompt, 'n', 'y')
while True:
ans = raw_input(prompt)
if not ans:
return resp
if ans not in ['y', 'Y', 'n', 'N']:
print 'please enter y or n.'
continue
if ans == 'y' or ans == 'Y':
return True
if ans == 'n' or ans == 'N':
return False
## end of http://code.activestate.com/recipes/541096/ }}}
# function #1 - getps
def getps(this_seriesname, this_source):
get_this_series = this_distro.getSeries(name_or_version = this_seriesname)
last_pubapp = umd_achive.getPublishedSources(
exact_match=True,
source_name=this_source,
distro_series=get_this_series
)[0]
result = last_pubapp.source_package_version
print result
return result
# function #2 - copypackage
def copypackage(copy_to_this_ppa,copy_this_souce,copy_this_version):
target = lp_.me.getPPAByName(name=copy_to_this_ppa)
target.syncSource(
source_name=copy_this_souce,
version=copy_this_version,
from_archive=umd_achive,
include_binaries=True,
to_series=None,
to_pocket='Release',
)
print 'Copied to: ' + target.displayname
print 'Package: ' + copy_this_souce + ' - ' + copy_this_version
print
print 'Retrieve the list of Published Packages.'
print
# Main
print 'Copy To TEST Archive:'
print 'Firefox-3.6 Lucid: ' + 'ppa:silverwave/one-daily-a-month'
print 'Firefox-3.7 Lucid: ' + 'ppa:silverwave/one-daily-a-month'
print 'Firefox-3.6 Karmic: ' + 'ppa:silverwave/ppa'
print 'Firefox-3.7 Karmic: ' + 'ppa:silverwave/ppa'
print
'''http://releases.ubuntu.com/releases/lucid/
ubuntu-10.04-desktop-amd64.iso
ubuntu-10.04-desktop-i386.iso
1. Copy to 'one-daily-a-month' which is the Testing PPA for Lucid.
2. TestDrive in Lucid amd64 (add ppa and install updates).
3. TestDrive in Lucid i386 (add ppa and install updates).'''
# List and Copy Lucid
if confirm(prompt='List UMD - FF3.6 *Lucid?', resp=True):
applff36 = getps('lucid','firefox')
applxu92 = getps('lucid','xulrunner-1.9.2')
print
if confirm(prompt='Copy to odam?', resp=False):
copypackage('one-daily-a-month','firefox', applff36)
copypackage('one-daily-a-month','xulrunner-1.9.2', applxu92)
else : print
if confirm(prompt='List UMD - FF3.7 *Lucid?', resp=True):
applff37 = getps('lucid','firefox-3.7')
applxu93 = getps('lucid','xulrunner-1.9.3')
print
if confirm(prompt='Copy to odam?', resp=False):
copypackage('one-daily-a-month','firefox-3.7', applff37)
copypackage('one-daily-a-month','xulrunner-1.9.3', applxu93)
else : print
'''http://releases.ubuntu.com/releases/lucid/
ubuntu-10.04-desktop-amd64.iso
ubuntu-10.04-desktop-i386.iso
1. Copy to 'ppa' which is the Testing PPA for Karmic.
2. TestDrive in Karmic amd64 (add ppa and install updates).
3. TestDrive in Karmic i386 (add ppa and install updates).'''
# List and Copy Karmic
if confirm(prompt='List UMD - FF3.6 Karmic?', resp=True):
appkff36 = getps('karmic','firefox')
appkxu92 = getps('karmic','xulrunner-1.9.2')
print
if confirm(prompt='Copy to ppa?', resp=False):
copypackage('ppa','firefox', appkff36)
copypackage('ppa','xulrunner-1.9.2', appkxu92)
else : print
if confirm(prompt='List UMD - FF3.7 Karmic?', resp=True):
appkff37 = getps('karmic','firefox-3.7')
appkxu93 = getps('karmic','xulrunner-1.9.3')
print
if confirm(prompt='Copy to ppa?', resp=False):
copypackage('ppa','firefox-3.7', appkff37)
copypackage('ppa','xulrunner-1.9.3', appkxu93)
else : print
print 'done.'
lp-getPubSo-and-Copy_odam-prod.py
#! /usr/bin/env python
#123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789
# 1 2 3 4 5 6 7 8
#silverwave OpenPGP key 03187548
#
print
print 'Connect to Service and Register Application.'
from launchpadlib.launchpad import Launchpad
lp_ = Launchpad.login_with('sapp3', 'edge')
print
print 'Check Configuration.'
this_distro = lp_.distributions["ubuntu"]
print 'Distribution: ' + this_distro.display_name
umd_achive = lp_.people['ubuntu-mozilla-daily'].archive
print 'Copy From Archive: '
print umd_achive.displayname
print
# function #0 - confirm
## {{{ http://code.activestate.com/recipes/541096/ (r1)
def confirm(prompt=None, resp=False):
"""prompts for yes or no response from the user.
Returns True for yes and False for no.
'resp' should be set to the default value
>>> confirm(prompt='Create Directory?', resp=True)
Create Directory? [y]|n:
True
>>> confirm(prompt='Create Directory?', resp=False)
Create Directory? [n]|y:
False
>>> confirm(prompt='Create Directory?', resp=False)
Create Directory? [n]|y: y
True
"""
if prompt is None:
prompt = 'Confirm'
if resp:
prompt = '%s [%s]|%s: ' % (prompt, 'y', 'n')
else:
prompt = '%s [%s]|%s: ' % (prompt, 'n', 'y')
while True:
ans = raw_input(prompt)
if not ans:
return resp
if ans not in ['y', 'Y', 'n', 'N']:
print 'please enter y or n.'
continue
if ans == 'y' or ans == 'Y':
return True
if ans == 'n' or ans == 'N':
return False
## end of http://code.activestate.com/recipes/541096/ }}}
# function #1 - getps
def getps(this_seriesname, this_source):
get_this_series = this_distro.getSeries(name_or_version = this_seriesname)
last_pubapp = umd_achive.getPublishedSources(
exact_match=True,
source_name=this_source,
distro_series=get_this_series
)[0]
result = last_pubapp.source_package_version
print result
return result
# function #2 - copypackage
def copypackage(copy_to_this_ppa,copy_this_souce,copy_this_version):
target = lp_.me.getPPAByName(name=copy_to_this_ppa)
target.syncSource(
source_name=copy_this_souce,
version=copy_this_version,
from_archive=umd_achive,
include_binaries=True,
to_series=None,
to_pocket='Release',
)
print 'Copied to: ' + target.displayname
print 'Package: ' + copy_this_souce + ' - ' + copy_this_version
print
print 'Retrieve the list of Published Packages.'
print
# Main
print 'Copy To PROD Archive:'
print 'Firefox-3.6 Lucid: ' + 'ppa:silverwave/one-daily-a-month-0'
print 'Firefox-3.7 Lucid: ' + 'ppa:silverwave/one-daily-a-month-1'
print 'Firefox-3.6 Karmic: ' + 'ppa:silverwave/one-daily-a-month-2'
print 'Firefox-3.7 Karmic: ' + 'ppa:silverwave/one-daily-a-month-3'
print
# Copy to 'one-daily-a-month-0' which is the FF3.6 PPA for Lucid.
# Copy to 'one-daily-a-month-1' which is the FF3.7 PPA for Lucid.
# List and Copy Lucid
if confirm(prompt='List UDM - FF3.6 *Lucid?', resp=True):
applff36 = getps('lucid','firefox')
applxu92 = getps('lucid','xulrunner-1.9.2')
print
if confirm(prompt='Copy to ODAM0?', resp=False):
copypackage('one-daily-a-month-0','firefox', applff36)
copypackage('one-daily-a-month-0','xulrunner-1.9.2', applxu92)
else : print
if confirm(prompt='List UDM - FF3.7 *Lucid?', resp=True):
applff37 = getps('lucid','firefox-3.7')
applxu93 = getps('lucid','xulrunner-1.9.3')
print
if confirm(prompt='Copy to ODAM1?', resp=False):
copypackage('one-daily-a-month-1','firefox-3.7', applff37)
copypackage('one-daily-a-month-1','xulrunner-1.9.3', applxu93)
else : print
# Copy to 'one-daily-a-month-2' which is the FF3.6 PPA for Karmic.
# Copy to 'one-daily-a-month-3' which is the FF3.7 PPA for Karmic.
# List and Copy Karmic
if confirm(prompt='List ODAM2 - FF3.6 Karmic?', resp=True):
appkff36 = getps('karmic','firefox')
appkxu92 = getps('karmic','xulrunner-1.9.2')
print
if confirm(prompt='Copy to ODAM2?', resp=False):
copypackage('one-daily-a-month-2','firefox', appkff36)
copypackage('one-daily-a-month-2','xulrunner-1.9.2', appkxu92)
else : print
if confirm(prompt='List ODAM3 - FF3.7 Karmic?', resp=True):
appkff37 = getps('karmic','firefox-3.7')
appkxu93 = getps('karmic','xulrunner-1.9.3')
print
if confirm(prompt='Copy to ODAM3?', resp=False):
copypackage('one-daily-a-month-3','firefox-3.7', appkff37)
copypackage('one-daily-a-month-3','xulrunner-1.9.3', appkxu93)
else : print
print 'done.'
Listing latest published packages in a PPA
OK so now I have a way of listing the latest published packages in a PPA. :-)
The key is that I can specify the series e.g. lucid or karmic and get results for each.
Note: Learning python as I go… :-)
Yes a better function is called for but this will do for now.
Advantages over the web interface:
It is easy to see the 8 packages I am interested in (out of the 50 in the ppa).
I can also quickly confirm when all the packages have been built (I just check the date).
___
Code
#! /usr/bin/env python
from launchpadlib.launchpad import Launchpad
launchpad = Launchpad.login_with('bot100', 'edge')
distro = launchpad.distributions["ubuntu"]
ppa = launchpad.people['ubuntu-mozilla-daily'].archive
def getPS(seri, source):
series = distro.getSeries(name_or_version = seri)
last_app = ppa.getPublishedSources(
exact_match=True,
source_name=source,
distro_series=series
)[0]
apptemp = last_app.source_package_version
print apptemp
return apptemp
appff10 = getPS('lucid','firefox')
appff20 = getPS('lucid','firefox-3.7')
appff30 = getPS('lucid','xulrunner-1.9.2')
appff40 = getPS('lucid','xulrunner-1.9.3')
print
appff1 = getPS('karmic','firefox')
appff2 = getPS('karmic','firefox-3.7')
appff3 = getPS('karmic','xulrunner-1.9.2')
appff4 = getPS('karmic','xulrunner-1.9.3')
___
Results:
$ ./lp-getPublishedSources_one-daily-a-month.py 3.6.5~hg20100428r34143+nobinonly-0ubuntu1~umd1 3.7~a5~hg20100429r41513+nobinonly-0ubuntu1~umd1 1.9.2.5~hg20100428r34143+nobinonly-0ubuntu1~umd1 1.9.3~a5~hg20100429r41513+nobinonly-0ubuntu1~umd1 3.6.5~hg20100428r34143+nobinonly-0ubuntu1~umd1~karmic 3.7~a5~hg20100429r41513+nobinonly-0ubuntu1~umd1~karmic 1.9.2.5~hg20100428r34143+nobinonly-0ubuntu1~umd1~karmic 1.9.3~a5~hg20100429r41513+nobinonly-0ubuntu1~umd1~karmic $
___
Launchpad syncSources missing “from series”
OK a new project involving PPA’s, Launchpad, launchpadlib, Soyuz.
Lets start documenting some of this stuff while its fresh.
Tag the project “onedailyamonth” so I can find it later.
This may be a rather brutal introduction to python for me…
Oh well learning something new is always fun :-)
It works… everything else is bonus points.
Onwards…
$ python
##Start up the Launchpad command line.
>>> from launchpadlib.launchpad import Launchpad
##Start up your application and login.
launchpad = Launchpad.login_with('bot100', 'edge')
##Authorise the app in Launchpad and away you go...
Run the script or paste each command in turn to test it.
#! /usr/bin/env python
from launchpadlib.launchpad import Launchpad
launchpad = Launchpad.login_with('bot100', 'edge')
{{{
from_archive = launchpad.people['ubuntu-mozilla-daily'].archive
to_archive = launchpad.me.getPPAByName(name='one-daily-a-month')
sources_to_be_copied = ['firefox','xulrunner-1.9.2']
print to_archive.syncSources(
source_names=sources_to_be_copied,
from_archive=from_archive,
to_pocket='release',
to_series=None,include_binaries=True,
)
sources_to_be_copied = ['firefox-3.7', 'xulrunner-1.9.3']
to_archive = launchpad.me.getPPAByName(name='one-daily-a-month-1')
print to_archive.syncSources(
source_names=sources_to_be_copied,
from_archive=from_archive,
to_pocket='release',
to_series=None,
include_binaries=True,
)
}}}
___
This is great except it will not do a series, e.g. karmic, separately :-(
“API for copying packages (syncSources) needs a “from series” parameter” Bug #493914
So I will need to use syncSource instead.
This further means, that I will need a way to find the specific version name, for each of the packages.
Looking at the examples gives me something I can use…
“Listing the current package versions in a particular distroseries” here API/Examples.
OK we have a plan :-)
ShelveLogger 4.3.1
ShelveLogger.html 4.3.1 – (Download).
Just click the download link to see a working example.
(It also allows you to see the lightning fast Filtering in action).
______________________________
Below is the sourcecode for ShelveLogger.html
Note: After the big changes in 4.3, 4.3.1 is mainly code clean-up.
ShelveLogger 4.3
ShelveLogger.html 4.3 – (Download).
Just click the download link to see a working example.
(It also allows you to see the lightning fast Filtering in action).
______________________________
Below is the sourcecode for ShelveLogger.html
Note: The priority for this version was to add the built-in help and to integrate the filtering code.
