Thanks . I've reported

SLING-3307: Updated launchpad bundle list is not reflected after upgrade
https://issues.apache.org/jira/browse/SLING-3307

and attached a sample project which shows how it can be reproduced.

Robert

On Fri, Dec 27, 2013 at 9:29 AM, Carsten Ziegeler <[email protected]> wrote:
> Hi,
>
> I haven't looked into this stuff for a long time, so I might be wrong - but
> I think, the bundles in sling/starttup should already be there when the
> timestamp is tried to be calculated. So at first look, I think this is a bug
>
> Carsten
>
>
> 2013/12/20 Robert Munteanu <[email protected]>
>
>> Digging in the code a bit, I've noticed that the upgrade goes well if
>> I force the startup mode to update.
>>
>> The sling/conf/launchpad_timestamp.txt exists and is valid. It seems
>> that the StartupManager.getSelfTimeStamp() method does not get the
>> correct timestamp:
>>
>> - looks for the last-modified date of the jar loading
>> StartupManager.class - org.apache.sling.launchpad.base.jar
>> - looks for the last-modified date of the jar loading
>> LaunchpadContentProvider.class - still
>> org.apache.sling.launchpad.base.jar
>> - looks for the last-modified date of all the bundles from sling/startup
>> folder
>>
>> The problem is that at this point, the new/modified bundles are not
>> present in the sling/startup folder, so they are not taken into
>> account.
>>
>> Does this look like a bug or like something that I'm doing wrong? ( So
>> that I know whether to file a bug or keep digging )
>>
>> Thanks,
>>
>> Robert
>>
>> On Mon, Dec 16, 2013 at 12:56 PM, Robert Munteanu <[email protected]>
>> wrote:
>> > On Mon, Dec 16, 2013 at 1:26 AM, Robert Munteanu <[email protected]> wrote:
>> >
>> > (snip)
>> >
>> >> I'll try and get a sample launchpad online
>> >> tomorrow, perhaps that would make what I'm trying to achieve clearer.
>> >> I do have some pecularities in it, since I've tried to trim it down as
>> >> much as possible.
>> >
>> > I've uploaded a Maven project with a trimmed-down launchpad at
>> > https://github.com/rombert/launchpad-update-test , together with the
>> > steps I took to test the in-place update.
>> >
>> > Thanks,
>> >
>> > Robert
>> >
>> >>
>> >> Thanks,
>> >>
>> >> Robert
>> >>
>> >> $ diff -r sling{~,}
>> >> diff -r sling~/conf/launchpad-timestamp.txt
>> sling/conf/launchpad-timestamp.txt
>> >> 1c1
>> >> < 1387149743159
>> >> \ No newline at end of file
>> >> ---
>> >>> 1387149767577
>> >> \ No newline at end of file
>> >> Binary files sling~/installer/RegisteredResourceList.ser and
>> >> sling/installer/RegisteredResourceList.ser differ
>> >> Only in sling: org.apache.sling.launchpad.base.jar
>> >> Only in sling~: org.apache.sling.launchpad.base.jar.1387149742283
>> >> diff -r sling~/sling.properties sling/sling.properties
>> >> 2c2
>> >> < #Mon Dec 16 01:22:22 EET 2013
>> >> ---
>> >>> #Mon Dec 16 01:22:47 EET 2013
>> >>
>> >>
>> >>
>> >>>
>> >>> Carsten
>> >>>
>> >>>
>> >>>> Thanks,
>> >>>>
>> >>>> Robert
>> >>>>
>> >>>> >
>> >>>> > Carsten
>> >>>> >
>> >>>> >
>> >>>> > 2013/12/16 Robert Munteanu <[email protected]>
>> >>>> >
>> >>>> >> Hi,
>> >>>> >>
>> >>>> >> I'm trying to find out what is the proper way of delivering an
>> updated
>> >>>> >> bundle list to a launchpad-based application.
>> >>>> >>
>> >>>> >> I took the following steps:
>> >>>> >>
>> >>>> >> 1. Built a launchpad using a basic bundle list and executed the jar
>> >>>> >> with java -jar
>> >>>> >> 2a. Added a new bundle to list.xml and rebuilt the jar . Executed
>> the
>> >>>> >> jar with the same sling directory
>> >>>> >> 2b. Increased a bundle's version in list.xml and rebuilt the jar .
>> >>>> >> Executed the jar with the same sling directory
>> >>>> >>
>> >>>> >> Both 1+2a and 1+2b left me with the same bundle list from 1. Just
>> to
>> >>>> >> be on the safe side, I additionally updated the launchpad's
>> version,
>> >>>> >> but that still did not work.
>> >>>> >>
>> >>>> >> I know about using the Felix console and the maven-sling-plugin,
>> but
>> >>>> >> sometimes it's easier to deliver one updated launchpad jar. This
>> leads
>> >>>> >> me to wonder, how can I update the bundles which are delivered
>> with a
>> >>>> >> launchpad?
>> >>>> >>
>> >>>> >> Thanks,
>> >>>> >>
>> >>>> >> Robert
>> >>>> >>
>> >>>> >
>> >>>> >
>> >>>> >
>> >>>> > --
>> >>>> > Carsten Ziegeler
>> >>>> > [email protected]
>> >>>>
>> >>>>
>> >>>>
>> >>>> --
>> >>>> Sent from my (old) computer
>> >>>>
>> >>>
>> >>>
>> >>>
>> >>> --
>> >>> Carsten Ziegeler
>> >>> [email protected]
>> >>
>> >>
>> >>
>> >> --
>> >> Sent from my (old) computer
>>
>
>
>
> --
> Carsten Ziegeler
> [email protected]



-- 
Sent from my (old) computer

Reply via email to